package com.vizhuo.base.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.vizhuo.utils.DateUtil;

public class BaseModel<T> implements Serializable
{
	/**
	 * id
	 */
	protected T id;
	
    /**
     * 状态
     */
	protected String status;
	
	    /**
     * 创建人id
     */
	protected int createUserId;
	
    /**
     * 创建时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    protected Date createDatetime;
	
    /**
     * 最后修改人id
     */
	protected int lastModifyUserId;
	
    /**
     * 最后修改时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    protected Date lastModifyDatetime;

	public T getId()
	{
		return id;
	}

	public void setId(T id)
	{
		this.id = id;
	}

	public String getStatus()
	{
		return status;
	}

	public void setStatus(String status)
	{
		this.status = status;
	}

	public int getCreateUserId()
	{
		return createUserId;
	}

	public void setCreateUserId(int createUserId)
	{
		this.createUserId = createUserId;
	}

	public Date getCreateDatetime()
	{
		return createDatetime;
	}
	
	public String getCreateDatetimeStr()
	{
		return DateUtil.date2String(createDatetime);
	}

	public void setCreateDatetime(Date createDatetime)
	{
		this.createDatetime = createDatetime;
	}

	public int getLastModifyUserId()
	{
		return lastModifyUserId;
	}

	public void setLastModifyUserId(int lastModifyUserId)
	{
		this.lastModifyUserId = lastModifyUserId;
	}

	public Date getLastModifyDatetime()
	{
		return lastModifyDatetime;
	}
	
	public String getLastModifyDatetimeStr()
	{
		return DateUtil.date2String(lastModifyDatetime);
	}

	public void setLastModifyDatetime(Date lastModifyDatetime)
	{
		this.lastModifyDatetime = lastModifyDatetime;
	}
}
